() => {
    //1.interface关键字 使用来定义一个接口
    interface objType {
        name: string
        age: number
        doThing: (a: number) => number
    }
    const obj: objType = {
        name: "张三",
        age: 20,
        doThing(a) {
            return 123
        },
    }


    //
    //
    //2.接口是可以继承的
    //obj2首先拥有obj的所有属性  并且也有自己的属性
    interface obj2Type extends objType {
        height: number;
        weight: number
    }
    const obj2: obj2Type = {
        name: "张三",
        age: 20,
        doThing(a) {
            return 123
        },
        height: 180,
        weight: 130,

    }

    //
    //
    //
    //交叉类型
    interface obj3Type {
        name: string,
        age: number
    }
    const obj3: obj3Type = {
        name: "张三",
        age: 20
    }

    interface obj4Type {
        height: number
        weight: number
    }

    const obj4: obj4Type = {
        height: 180,
        weight: 130
    }

    type obj5Type = obj4Type & obj3Type;
    const obj5: obj5Type = {
        name: "张三",
        age: 20,
        height: 180,
        weight: 130
    }
}